package com.heima.Serivce;

import com.heima.Serivce.impl.WemediaClientFallBackeFactroy;
import com.heima.model.Admin.Dtos.ChannelDto;
import com.heima.model.Admin.Dtos.SensitiveDto;
import com.heima.model.common.dtos.ResponseResult;
import com.heima.model.common.dtos.WmNewsPageReqDto;
import com.heima.model.wemedia.pojos.WmNews;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;


@FeignClient(value = "HMTTWemediaService",fallbackFactory = WemediaClientFallBackeFactroy.class)
public interface WemediaCilent {
    @PostMapping("/wemedia/MEDIA/wemedia/api/v1/sensitive/list")
    public ResponseResult GetSensitiveList(@RequestBody SensitiveDto sensitiveDto);

    @PostMapping("/wemedia/MEDIA/wemedia/api/v1/channel/list")
    public ResponseResult GetChamnelList(@RequestBody ChannelDto channelDto);

    @PostMapping("/wemedia/MEDIA/wemedia/api/v1/news/list")
    public ResponseResult GetArticleList(@RequestBody WmNewsPageReqDto wmNewsPageReqDto);

    @GetMapping("/wemedia/MEDIA/wemedia/api/v1/news/one/{id}")
    public ResponseResult GetArticleById(@PathVariable Integer id);

    @PostMapping("/wemedia/MEDIA/wemedia/api/v1/news/save")
    public ResponseResult SaveArticle(@RequestBody WmNews wmNews);

    @PostMapping("/wemedia/MEDIA/wemedia/api/v1/news/update")
    public ResponseResult UpdateArticle(@RequestBody WmNews wmNews);

}
